package com.BigDate.server.service;

import com.BigDate.server.pojo.RespBean;
import com.BigDate.server.pojo.RespPageBean;
import com.BigDate.server.pojo.User;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author stx
 * @since 2021-12-22
 */
public interface IUserService extends IService<User>
{
    User userLogin(String username,String password);

    /**
     * 用户登录
     * @param username
     * @param password
     * @param code
     * @param request
     * @return
     */
    RespBean Login(String username, String password, String code, HttpServletRequest request);

    int updatePwd(User user);

    IPage<User> findAll(Page<User> page);

    User findById(Integer id);

    int deleteById(Integer id);

    int update(User user);

    int add(User user);

    RespPageBean getUserByPage(Integer currentPage, Integer size, User user);
}
